import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/page/home/Home.vue'
import Faceimg from '@/page/faceimg/Faceimg.vue'
import Idcard from '@/page/idcard/Idcard.vue'
import StatusUpload from '@/page/status/upload/upload.vue'
 
Vue.use(VueRouter)
 
const routes = [
    {
        path: '/',
        redirect: "/home"
    },
    {
        path: '/home',
        name: 'Home',
        component: Home,
        props: true, // 允许路由传递参数作为 props
        meta: {
            keepAlive: true, //此组件需要被缓存
        }
    },
    {
        path: '/faceimg',
        name: 'Faceimg',
        component: Faceimg,
        props: true, // 允许路由传递参数作为 props
        meta: {
            keepAlive: true, //此组件需要被缓存
            
        }
    },
    {
        path: '/idcard',
        name: 'Idcard',
        component: Idcard,
        props: true, // 允许路由传递参数作为 props
        meta: {
            keepAlive: true, //此组件需要被缓存
        }
    },
    {
        path: '/status/upload',
        name: 'StatusUpload',
        component: StatusUpload
    },
 
]
 
const router = new VueRouter({
    mode: 'hash',
    // mode:'history',
    base: process.env.BASE_URL,
    routes
})
 
export default router